package com.example.exchange;

import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;



@RestController

public class GetPUConnection {
	 @Value("${com.zyd.serverip}")
	private String serverip ="60.28.104.248";
	 @Value("${com.zyd.serverport}")
	private Integer serverport = 9002;
	 @Value("${com.zyd.shortname}")
	private String shortname ="BOMESC";
	 @Value("${com.zyd.authcode}")
	private String authcode ="ORACLE";

	Logger logger = Logger.getLogger(GetPUConnection.class);

	public GetPUConnection() {
		this.getEndpoint();
	}

	public String getEndpoint() {
		/*
		 * this.serverip = ; this.shortname = ; this.authcode = ; this.serverport = ;
		 */

		return "http://" + this.serverip + ":" + this.serverport + "/ws/un/services/UnifierWebServices";
	}

	public String getServerip() {
		return serverip;
	}

	public void setServerip(String serverip) {
		this.serverip = serverip;
	}

	public Integer getServerport() {
		return serverport;
	}

	public void setServerport(Integer serverport) {
		this.serverport = serverport;
	}

	public String getShortname() {
		return shortname;
	}

	public void setShortname(String shortname) {
		this.shortname = shortname;
	}

	public String getAuthcode() {
		return authcode;
	}

	public void setAuthcode(String authcode) {
		this.authcode = authcode;
	}


	
	
}